package com.agileboot.domain.airport.danger.db;

import com.agileboot.common.core.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Getter
@Setter
@TableName("sir_danger_source")
@ApiModel(value = "DangerSourceEntity对象", description = "危险源表（含隐患迁移字段）")
public class DangerSourceEntity extends BaseEntity<DangerSourceEntity> {

    @TableId(value = "danger_source_id", type = IdType.AUTO)
    private Long dangerSourceId;

    private String dangerSourceCode;
    private String dangerType;
    private String dangerSourceName;
    private Long dutyDeptId;
    private Long sendDeptId;
    private Long actionDeptId;
    private String professionalCategory;
    private Date findTime;
    private String dangerSourceOrigin;
    private String dangerSourceMajorFlag;
    private String controlState;
    private String dangerSourceDescribe;
    private String harmDescribe;
    private String emergeCause;
    private String rootCause;
    private String triggerFactor;
    private String typicalEvent;
    private String consequence;
    private String havePreventMeasures;
    private String verification;
    private String remark;
    private BigDecimal riskBeforePossibility;
    private BigDecimal riskBeforeSeriousness;
    private String riskBeforeVal;
    private String riskBeforeRank;
    private BigDecimal riskAfterPossibility;
    private BigDecimal riskAfterSeriousness;
    private String riskAfterVal;
    private String riskAfterRank;
    private String monitorDeptPeople;
    private String monitorTrackSituation;
    private String monitorFrequencyDate;
    private BigDecimal controlAfterPossibility;
    private BigDecimal controlAfterSeriousness;
    private String controlAfterVal;
    private String controlAfterRank;
    private String derivedRiskExistFlag;
    private String derivedRiskDescribe;
    private String createBy;
    private Date createTime;
    private String updateBy;
    private Date updateTime;
    private String status;
    private Long relatedReformId;
    private String relatedReformCode;
    private String correctiveAction;
    private Date correctiveDeadline;
    private String precautionAction;
    private Date precautionDeadline;
    private String actionMakerName;
    private Date actionMakeTime;
    private String riskCode;
    private Long riskId;
    private Long relatedQuestionId;
    private String associatedFlag;
    private Long deriveDangerSourceId;
    private String leaderContent;
    private String leaderIsOk;
    private String leaderName;
    private Date leaderTime;
    private Boolean deleted;
    private Long creatorId;
    private Long updaterId;

    /** 新增：数据来源类型（1=危险源，2=隐患） */
    private String sourceType;

    /** 新增：隐患独有字段 */
    private Long drillPlanId;
    private String hiddenTroubleRank;
    private String rankJudgeName;
    private Date rankJudgeTime;
    private String hiddenTroubleType;
    private Long superviseDeptId;
    private Date rectificationTime;
    private Integer rectificationSchedule;
    private Date finishTime;
    private String relatedRiskAction;
    private String tempControlAction;
    private String reformFunds;
    private String actionIsOk;
    private String actionEval;
    private String actionEvalerName;
    private Date actionEvalTime;

    @Override
    public Serializable pkVal() {
        return this.dangerSourceId;
    }
}
